﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AWZhome.NQ.Core;

namespace AWZhome.NQ.CommonServices
{
	[NQServiceInterface]
	public interface ITestFileHandlerService : INQFileGUIHandler
	{
	}

	[NQExportedService]
	[NQServiceAttachment(CommonAttachLists.FileGUIManager_Handlers)]
	internal class TestFileHandler : ITestFileHandlerService
	{
		private INQFileGUIDescriptor[] _fileDescriptors;

		private class FileDescriptor : INQFileGUIDescriptor
		{

			#region INQFileGUIDescriptor Member


			public string FilterName
			{
				get;
				internal set;
			}

			public string Text
			{
				get;
				internal set;
			}

			public string Mask
			{
				get;
				internal set;
			}

			public string Description
			{
				get;
				internal set;
			}

			public string Group
			{
				get;
				internal set;
			}

			public string IconResComponent
			{
				get;
				internal set;
			}

			public string IconResName
			{
				get;
				internal set;
			}

			#endregion

		}

		public TestFileHandler()
		{
			_fileDescriptors = new INQFileGUIDescriptor[]
				{
					new FileDescriptor() { Text = "Testfile1", Description = "This is Testfile1", Group="Testfiles", FilterName="Testfile 1", Mask="*.txt" },
					new FileDescriptor() { Text = "Testfile2", Description = "This is Testfile2", Group="Testfiles", FilterName="Testfile 2", Mask="*.txt" }
				};
		}

		#region INQFileGUIHandlerService Member

		public INQFileGUIDescriptor[] FileDescriptors
		{
			get
			{
				return _fileDescriptors;
			}
		}

		public void NewFileSelected(IContainer container, INQFileGUIDescriptor fileDescriptor)
		{

		}

		public void OpenFileSelected(IContainer container, INQFileGUIDescriptor fileDescriptor, string filename)
		{

		}

		#endregion

	}
}
